package com.zlz.m3u8download.bean.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum M3u8Type {

    LIST(0),

    VIDEO(1),
    ;

    private final Integer value;

    public static M3u8Type valueOf(int value) {
        for (M3u8Type status : M3u8Type.values()) {
            if (status.getValue() == value) {
                return status;
            }
        }
        throw new IllegalArgumentException("Invalid download status value: " + value);
    }
}
